package com.force.abril.prevision.download.transformer;


import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Component;

import br.com.abril.prevision.Prevision;

import com.sforce.soap.partner.sobject.SObject;

@Component
public class PrevisionTransformer {

	private TranformerHelper tranformerHelper;
	
	public PrevisionTransformer() {
		tranformerHelper = new TranformerHelper();
	}

	public List<Prevision> toPrevisionsFromSObject(SObject[] sfPrevisions) {
		List<Prevision> previsions = new ArrayList<Prevision>();
		
		
		
		for (SObject sfPrevision : sfPrevisions) {
			previsions.add(tranformerHelper.toLocalPrevision(sfPrevision));
		}
		return previsions;
	}

}
